from django.conf.urls import url

from . import views

# app name
app_name = 'ddm'

urlpatterns = [
	# 提交下载任务
	# url(r'^(?P<username>(\w+[0-9a-zA-Z]*[(@shilupan.com)|(@slooptech.com)|(@i100home.com)]*))/post/', views.task_post, name='post'),
	url(r'^(?P<username>(\w+[0-9a-zA-Z]+))/post/', views.task_post, name='post'),
	# 任务执行进度
	# url(r'^(?P<username>(\w+[0-9a-zA-Z]*[(@shilupan.com)|(@slooptech.com)|(@i100home.com)]*))/result/(?P<days>\d+)/', views.task_result, name='result'),
	url(r'^(?P<username>(\w+[0-9a-zA-Z]+))/result/(?P<days>\d+)/', views.task_result, name='result'),
	# 查看任务详情
	# url(r'^(?P<username>(\w+[0-9a-zA-Z]*[(@shilupan.com)|(@slooptech.com)|(@i100home.com)]*))/detail/(?P<task_id>(.*?))/', views.task_detail, name='detail'),
	url(r'^(?P<username>(\w+[0-9a-zA-Z]+))/detail/(?P<task_id>(.*?))/', views.task_detail, name='detail'),
	# 用户审批下载任务
	# url(r'(?P<username>(\w+[0-9a-zA-Z]*[(@shilupan.com)|(@slooptech.com)|(@i100home.com)]*))/approval/(?P<task_id>(.*?))/', views.task_approval, name='approval'),
	url(r'(?P<username>(\w+[0-9a-zA-Z]+))/approval/(?P<task_id>(.*?))/', views.task_approval, name='approval'),
	# # 任务完毕后更新任务执行信息
	# url(r'^(?P<username>(\w+[0-9a-zA-Z]*[(@shilupan.com)|(@slooptech.com)|(@i100home.com)]*))/update/', views.update_task_status, name='update')
]
